package com.ksy.common.dialog;

import android.app.Dialog;
import android.content.Context;
import android.support.annotation.NonNull;
import android.widget.Toast;

import com.ksy.common.R;


/**
 * Created by Ksy.
 */

public class BaseDialog extends Dialog {

    private Toast toast;

    public BaseDialog(@NonNull Context context) {
        this(context, R.style.DialogStyle);
    }

    public BaseDialog(@NonNull Context context, int styleId) {
        super(context, styleId);
    }

    protected void showToast(String msg) {
        if (toast == null) {
            toast = Toast.makeText(getContext(), "", Toast.LENGTH_SHORT);
        }
        toast.setText(msg);
        toast.show();
    }



}
